import request from '@/config/axios'

export interface NetAccountConfigVO {
  id: number
  memberUserId: number
  netSysId: number
  netAccount: string
  oldNetExpiresTime: Date
  netNetExpiresTime: Date
  lastPayTime: Date
}

// 查询宽带账号配置列表
export const getNetAccountConfigPage = async (params) => {
  return await request.get({ url: `/zwsj/net-account-config/page`, params })
}

// 查询宽带账号配置详情
export const getNetAccountConfig = async (id: number) => {
  return await request.get({ url: `/zwsj/net-account-config/get?id=` + id })
}

// 新增宽带账号配置
export const createNetAccountConfig = async (data: NetAccountConfigVO) => {
  return await request.post({ url: `/zwsj/net-account-config/create`, data })
}

// 删除宽带账号配置
export const deleteNetAccountConfig = async (id: number) => {
  return await request.delete({ url: `/zwsj/net-account-config/delete?id=` + id })
}


//通过（计费接口）查询账号信息
export const getLfAccountByAccount = async (netSysId: number,account: string) => {
  const params =  {"netSysId": netSysId,"account": account}
  return await request.get({ url: `/zwsj/net-account-config/get/lf/account/by/account`,params })
}
